package com.cms.meeting.mapper;

import com.cms.meeting.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    Employee loadEmpByUsername( String username);

    Integer doReg(Employee employee);

    List<Employee> getAllEmpsByStatus(Integer status);

    Integer updatestatus(@Param("employeeid") Integer employeeid, @Param("status") Integer status);

    List<Employee> getAllEmps(@Param("emp") Employee employee, @Param("page") Integer page, @Param("pagesize") Integer pageSize);

    Long getTotal(Employee employee);
    /**
     * 通过部门编号获取员工
     *
     * @param depId 部门编号
     * @return List<Employee>
     */
    List<Employee> getEmpsByDepId(Integer depId);

    /**
     * 通过employeeid集合获取员工的信息
     *
     * @param list List<Integer>
     * @return List<Employee>
     */
    List<Employee> getAllEmpsByid(List<Integer> list);

    /**
     * 修改密码
     *
     * @param username    用户名
     * @param newpassword 新密码
     */
    void doChang(@Param("username") String username, @Param("newpassword") String newpassword);
}
